import { RUNNING_CONDITION, SEARCH_CAR, GET_LONGITUDE_AND_LATITUDE, GET_HISTORY_TRACE } from './api'
import { METHOD, request } from '@/utils/request'
const TIME_OUT = 20000

/**
 * 获取单车信息
 * @param 分页
 * @returns {Promise<AxiosResponse<T>}
 */
export async function getRunningCondition(params) {
    return request(RUNNING_CONDITION, METHOD.POST, params, {timeout: TIME_OUT})
}

// 获取模糊搜索的值
export async function getCarList(params) {
    return request(SEARCH_CAR, METHOD.POST, params, {timeout: TIME_OUT})
}

// 获取经纬度  
export async function getLongitudeAndLatitude(params) {
    return request(GET_LONGITUDE_AND_LATITUDE, METHOD.POST, params, {timeout: TIME_OUT})
}

// 查询历史轨迹  
export async function getHistoryTrace(params) {
    return request(GET_HISTORY_TRACE, METHOD.POST, params, {timeout: TIME_OUT})
}